//
// Created by 12992 on 24-10-17.
//

#ifndef AUDIOENCODECONFIGITEM_H
#define AUDIOENCODECONFIGITEM_H

#include <QWidget>
#include "audio_config.hpp"

namespace gui::widgets
{
    QT_BEGIN_NAMESPACE
    namespace Ui { class AudioEncodeConfigItem; }
    QT_END_NAMESPACE

    class AudioEncodeConfigItem : public QWidget
    {
    Q_OBJECT

    public:
        explicit AudioEncodeConfigItem(const utils::audio_config& config, int streamId = 0, QWidget* parent = nullptr);

        ~AudioEncodeConfigItem() override;

        utils::audio_config getConfig() const;

    private slots:

        void changeCopyStream(Qt::CheckState state);

    private:
        void init_widget(int streamId);

        void init_signals();

        void set_widgets(const utils::audio_config& config);

    private:
        Ui::AudioEncodeConfigItem* ui;
    };
} // gui::widgets

#endif //AUDIOENCODECONFIGITEM_H
